//
//  LHChannelViewController.m
//  channelDemo
//
//  Created by zhouLiHuan on 2017/2/7.
//  Copyright © 2017年 zhouLiHuan. All rights reserved.
//

#import "LHChannelViewController.h"
#import "LHChannelView.h"

@interface LHChannelViewController ()
{
    VoidBlock _backBlock;
}

@end

@implementation LHChannelViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"频道定制";
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:self action:@selector(backMethod)];
    
    LHChannelView *menu = [[LHChannelView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height - 64)];
    [self.view addSubview:menu];

    
}

- (void)addBackBlock:(VoidBlock)block{
    _backBlock = block;
}
- (void)backMethod{
    //回调返回block
    if (_backBlock) {
        _backBlock();
    }
    
    //返回
    [self dismissViewControllerAnimated:YES completion:nil];
}


@end
